'------------------------------------------------------------------------------ 'FILE DESCRIPTION: Exchange Server Event Script ' Author: Stephen A. Gutknecht ' ' automessageclass application. ' http://support.microsoft.com/support/kb/articles/Q170/3/01.asp ' Q170301 ' ' This script is intended for Microsoft Exchange Server 5.5 ' event service (Agent tab). It is installed on the Inbox of mailbox ' or a public folder. Each incoming message will be re-assigned ' to the form specified in this code. '------------------------------------------------------------------------------ Option Explicit '------------------------------------------------------------------------------ ' Global Variables '------------------------------------------------------------------------------ '------------------------------------------------------------------------------ ' Event Handlers '------------------------------------------------------------------------------ ' DESCRIPTION: This event is fired when a new message is added to the folder Public Sub Folder_OnMessageCreated Dim CDOSession, oMsgTarget Dim NewMC, CurItem Set CDOSession = EventDetails.Session Set CurItem = CDOSession.GetMessage( EventDetails.MessageID, Null ) NewMC = "IPM.Note.IML-Reply_ISAPI" ' Test to see if the Message Class needs to be changed If CurItem.Type <> NewMC Then ' Change the Message Class CurItem.Type = NewMC ' return message to unread state CurItem.Unread = TRUE ' Save the changed item CurItem.Update End If End Sub ' DESCRIPTION: This event is fired when a message in the folder is changed Public Sub Message_OnChange End Sub ' DESCRIPTION: This event is fired when a message is deleted from the folder Public Sub Folder_OnMessageDeleted End Sub ' DESCRIPTION: This event is fired when the timer on the folder expires Public Sub Folder_OnTimer End Sub